#d#include <iostream>
using namespace std;

int pathNum(int n, int m)
{
    if (n == 0 || m == 0)
        return 1;
    return pathNum(n - 1, m) + pathNum(n, m - 1);
}
int main() {
    int n, m;
    while (cin >> n >> m)
    {
        cout << pathNum(n, m) << endl;
    }
    return 0;
}